package com.cqut.familiarity.service.impl;

import com.cqut.familiarity.entity.User;
import com.cqut.familiarity.entity.vo.ResultVO;
import com.cqut.familiarity.entity.vo.answerVO.AnswerVO;
import com.cqut.familiarity.entity.vo.userVO.UserVO;
import com.cqut.familiarity.mapper.UserMapper;
import com.cqut.familiarity.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author atao
 * @since 2021-06-03
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {


    @Override
    public int fillNumber(String id) {
        return userMapper.fillNumber(id);
    }

    @Override
    public int filledNumber(String id) {
        return userMapper.filledNumber(id);
    }

    @Override
    public List<UserVO> listFriends(String id) {
        return userMapper.listFriends(id);
    }

    @Override
    public List<String> getOthers(String user1_id, String questionnaire_id) {
        return userMapper.selectOthers(user1_id,questionnaire_id);
    }

    @Autowired
    private UserMapper userMapper;

    @Override
    public User isExist(String openId) {
        return userMapper.isExist(openId);
    }

    @Override
    public List<AnswerVO> radar(String user1_id,String user2_id) {
        return userMapper.radar(user1_id,user2_id);
    }

    @Override
    public List<AnswerVO> radars(String user1_id) {
        return userMapper.radars(user1_id);
    }

    @Override
    public List<ResultVO> chooseUser(String user1_id) {
        return userMapper.chooseUser(user1_id);
    }

}
